import axios from 'axios'
import Vue from 'vue'
const http =  axios.create({
  baseURL: '/api'
})

http.interceptors.request.use(config => {
    return config
}, err => {
    return  Promise.reject(err)
})

http.interceptors.response.use(res => {
    return res.data
}, err => {
    return Promise.reject(err)
})

export default http